/*
 * @lc app=leetcode.cn id=1832 lang=javascript
 *
 * [1832] 判断句子是否为全字母句
 */

// @lc code=start
/**
 * @param {string} sentence
 * @return {boolean}
 */
var checkIfPangram = function (sentence) {
  let val = 26;
  let arr = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
  for (let i = 0; i < sentence.length; i++) {
    const idx = sentence.charCodeAt(i) - 97
    if (arr[idx]) {
      val--;
      arr[idx] = false;
    }
  }
  return !val;
};
// @lc code=end
